package com.blockchainenergy.info.node;

import com.blockchainenergy.common.CarbonTools;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
public class NodeInfo {
    private Integer i;
    private Double[] inPower;
    private Double[] outPower;
    private List<NodePower> nodePowers;
    private NodeDialPlate nodeDialPlate;
    private Double[] recordFlow;
    private List<NodeFlow> currentNodeFlow;

    public NodeInfo(Integer i) throws Exception {
        this.i = i;
        this.inPower = CarbonTools.inpower(i);
        this.outPower = CarbonTools.outpower(i);
        this.nodePowers = CarbonTools.currentpower(i);
        this.nodeDialPlate = new NodeDialPlate(i);
        this.recordFlow = CarbonTools.recordflow(i);
        this.currentNodeFlow = CarbonTools.currentflow(i);
    }
}
